package shejimoshi.diedaiqimoshi;

public class client {
    public static void main(String[] args) {
        Aggregate aggregate = new ConcreteAggregate();
        aggregate.add(1);
        aggregate.add(3);
        aggregate.add(2);
        Iterator iterator = aggregate.getIterator();

        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }
}
